package cn.wolfcode.wms.mapper;

import cn.wolfcode.wms.domain.Employee;
import cn.wolfcode.wms.query.EmployeeQueryObject;
import cn.wolfcode.wms.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    //根据员工id查询对应的角色
    Employee selectByeIdRole(Long id);

    int updateByPrimaryKey(Employee record);

    Integer queryForCount(EmployeeQueryObject qo);

    List<Employee> queryForPage(EmployeeQueryObject qo);

    //添加外键关系
    void insertByRelation(@Param("eId") Long eId, @Param("roleId") Long roleId);

    //根据员工id来删除外键
    void deleteByeId(Long id);

    //用户登陆的账号检查
    Employee userLoginCheck(@Param("username") String username, @Param("password") String password);

    //根据员工的id来查询员工对应的所有权限表达式
    List<String> selectByEmployeeId(Long eId);

    void deletes(List<Long> arr);
}